﻿@model pbvs.Models.ContentPage

<script type="text/javascript" src="@Url.Content("~/Scripts/tiny_mce/jquery.tinymce.js")"></script>

@using (Html.BeginForm()) {
    @Html.HiddenFor(m => m.Id)
    <fieldset>
        <legend>Edit Page</legend>
        <div>
            <div>
                @Html.LabelFor(m => m.PageName)
            </div>
            <div>
                @Html.TextBoxFor(m => m.PageName)
            </div>
        </div>
        <div>
            <div>
                @Html.LabelFor(m => m.Title)
            </div>
            <div>
                @Html.TextBoxFor(m => m.Title)
            </div>
        </div>
        <div>
            <div>
                @Html.LabelFor(m => m.Body)
            </div>
            <div>
                @Html.TextAreaFor(m => m.Body, new { style = "width:400px;height:400px" })
            </div>
        </div>
        <div>
            <div>
                @Html.LabelFor(m => m.MenuTitle)
            </div>
            <div>
                @Html.TextBoxFor(m => m.MenuTitle)
            </div>
        </div>
        <div>
            <div>
                @Html.LabelFor(m => m.Parent)
            </div>
            <div>
                @Html.DropDownListFor(m => m.Parent, (SelectList)ViewBag.contentPages)
            </div>
        </div>
        <input type="submit" value="Save" />
    </fieldset>
}

<script type="text/javascript">
    $(function() {
        $("textarea").tinymce({
            script_url: "@Url.Content("~/Scripts/tiny_mce/tiny_mce.js")"
        });
    })
</script>